package com.team.service.Impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.team.dao.ComputerRoomDao;
import com.team.entity.ComputerRoom;
import com.team.service.ComputerRoomService;

@Service
@Transactional
public class ComputerRoomServiceImpl implements ComputerRoomService{
	@Autowired
	private ComputerRoomDao crd;

	@Override
	public List<ComputerRoom> findAllComputerRoom() {
		List<ComputerRoom> cr=crd.findAllComputerRoom();
		return cr;
	}

	@Override
	public ComputerRoom computerRoomById(Integer id) {
		ComputerRoom cr = crd.computerRoomById(id);
		return cr;
	}

	@Override
	public ComputerRoom saveComputerRoom(ComputerRoom computerRoom) {
		ComputerRoom saveComputerRoom = crd.saveComputerRoom(computerRoom);
		return saveComputerRoom;
	}

	@Override
	public boolean deleteComputerRoom(Integer id) {
		boolean deleteComputerRoom = crd.deleteComputerRoom(id);
		return deleteComputerRoom;
	}
	@Override
	public boolean updateComputerRoom(ComputerRoom computerRoom) {
		boolean updateComputerRoom = crd.updateComputerRoom(computerRoom);
		return updateComputerRoom;
	}

	@Override
	public ComputerRoom ComputerRoomInformation(String computerroomid) {
		ComputerRoom cr = crd.ComputerRoomInformation(computerroomid);
		return cr;
	}

	@Override
	public ComputerRoom myReservation(String booker) {
		ComputerRoom myReservation = crd.myReservation(booker);
		return myReservation;

	}

}
